//package com.chenliang.sc.transaction;
//
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @program: myes
// * @description:
// * @author: 陈英俊
// * @create: 2021-09-17 15:58
// */
//@ConditionalOnProperty(
//        prefix = "config",
//        name = {"enableGlobalTransaction"},
//        havingValue = "true"
//)
//@Configuration
//@Slf4j
//public class GlobalTransactionAutoConfiguration {
//    
//    private final ApplicationContext applicationContext;
//
//    public GlobalTransactionAutoConfiguration(ApplicationContext applicationContext) {
//        this.applicationContext = applicationContext;
//    }
//
//    @Bean
//    public GlobalTransactionScanner globalTransactionScanner() {
//        String applicationName = this.applicationContext.getEnvironment().getProperty("spring.application.name");
//        log.info("事务配置类从配置文件获取的应用名称:{}",applicationName);  
//        return new GlobalTransactionScanner(applicationName, "cl_tx_group");
//    }
//}
